<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%-- 广告 --%>
<div class="container" style="padding-bottom: 10px;">
    <div class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            <li data-slide-to="0"></li>
        </ol>

        <div class="carousel-inner">
            <div class="item active">
                <img src="" alt="...">
                <div class="carousel-control">
                    ....
                </div>
            </div>

        </div>

        <%--Controls--%>
        <a class="left carousel-control">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
</div>


<div class="container">
    <div class="row">
        <c:forEach items="${borrowInfos.content}" var="obj">
            <div class="col-md-3 borrowList">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <ol class="list-unstyled">
                            <li>${obj.name}</li>
                            <li>${obj.no}</li>
                            <li>${obj.repaymentMethod}</li>
                            <li>
                                <div class="progress">
                                    <fmt:formatNumber value="${obj.investMoney / obj.totalMoney}" type="PERCENT" var="progressNumber"/>
                                    <div class="progress-bar progress-bar-striped" style="min-width: 2em;width: ${progressNumber}">
                                            ${progressNumber}
                                    </div>
                                </div>
                            </li>
                        </ol>
                        <div>
                            <div class="col-md-6">
                                <p class="text-primary"><fmt:formatNumber value="${obj.investRate / 100}" type="PERCENT"/></p>
                                <p>年华收益率</p>
                            </div>
                            <div class="col-md-6">
                                <p class="text-primary">${obj.period}</p>
                                <p>借款期限</p>
                            </div>
                        </div>
                        <div>
                            <a href="<s:url value="/borrow/details/{id}"><s:param name="id" value="${obj.id}"/></s:url>" class="btn btn-default">投标</a>
                        </div>
                    </div>
                </div>
            </div>
        </c:forEach>
    </div>
</div>